home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
demo
/
wemdemo4.zip
/
INFO
/
WINEMACS.2
(
.txt
)
< prev
Wrap
GNU Info File
|
1994-09-21
|
42KB
|
761 lines
This is Info file ../info/winemacs, produced by Makeinfo-1.56 from the
input file winemacs.txi.
File: winemacs, Node: Intro to File Types, Next: Controlling the File Type, Up: Editing Binary Files
Introduction to Text and Binary Files
-------------------------------------
In a standard MS-DOS text file, the end of a line is signalled with
two characters, `CR' (ASCII 13) and `LF' (ASCII 10). (Unix text files,
on the other hand, signal the end of a line with just a `LF'.) In
addition, any `^Z' character encountered is not to be considered part
of the text, but rather marks the end of the file, and any text after
it is to be ignored. To facilitate editing both MS-DOS and Unix format
text files, Win-Emacs normally treats both a `CR'/`LF' combination and
a sole `LF' as marking the end of a line when reading in a text file,
and ignores a `^Z' character and any characters after it. When saving
the file out to disk, a `CR'/`LF' is written at the end of each line
and a `^Z' is written at the end of the file. (This means, for example,
that you can convert a Unix-format text file into an MS-DOS-format text
file simply by reading it into Win-Emacs and writing it out again.)
Sometimes these translations are not desirable; for example,
performing the translations on a `.EXE' file is likely to corrupt the
file. When editing such a file, Win-Emacs does no translation on
either input or output.
The "file type" of a file determines what sort of translation (text
or binary) is to be performed when reading in and writing out a file.
When editing an existing file in Win-Emacs, Win-Emacs normally
determines the file type of the file by looking at its extension (for
example, `.C' or `.EXE'). If it is not sure, it treats the file as
text, since this is the most likely case. When writing out a file,
Win-Emacs looks at the `file-type' variable for the file's buffer.
This is normally set according to the file's extension when the buffer
is created, so everything stays in sync.
For easy reference, the file type of a buffer is displayed in the
modeline, as either a `T' or `B' preceding the buffer's major mode.
For example:
--**-Emacs: lispref.txi (T:Texinfo)----42%---------------
indicates that the file `lispref.txi' is being edited in Texinfo
major mode and the file type is Text.
File: winemacs, Node: Controlling the File Type, Next: Lisp-Level File Type Info, Prev: Intro to File Types, Up: Editing Binary Files
Controlling the File Type
-------------------------
You can explicitly set the file type of a buffer using the command
`M-x set-file-type'. This accepts the strings `text' and `binary'.
Note that `M-x set-file-type' affects the way that the file will be
written out to disk, but not how it was read in, since this has already
occurred by the time `M-x set-file-type' can be used.
To explicitly specify the translations to be performed when a file
is read in, use the commands `M-x find-file-text' and `M-x
find-file-binary'. These commands cause Win-Emacs to treat the file
(and set the `file-type' variable of the file's buffer) accordingly,
regardless of the file's extension. If you just began editing a file
and notice that Win-Emacs guessed the wrong file type, you probably
want to type `C-x k' to kill the buffer, and then use one of the above
commands to edit the file again.
It was mentioned above that, if Win-Emacs cannot determine the file
type of a file from its name, it assumes the file is text. This can be
changed using the command `M-x set-default-file-type'.
File: winemacs, Node: Lisp-Level File Type Info, Prev: Controlling the File Type, Up: Editing Binary Files
Lisp-Level File Type Information
--------------------------------
This section is only of interest if you are writing Emacs-Lisp code.
- User Option: file-type
This variable holds the file type for a buffer: non-`nil' for text,
`nil' for binary. It automatically becomes buffer-local when it is
set it any fashion.
- Command: set-file-type TYPE &optional BUFFER
This function sets the value of `file-type' for BUFFER, which
defaults to the current buffer. When called interactively, it
accepts the strings `text' and `binary'. When called from Lisp, it
also accepts the symbols `text' and `binary' as well as `t' and
`nil'.
- Command: set-default-file-type TYPE
This function sets the default value of `file-type'. Its argument
is as in `set-file-type'. The initial default value is `t', for
text.
When a file is loaded into a buffer, Win-Emacs normally sets the
buffer's file type according to the name of the file (in most cases,
specifically by looking at the file's extension) and performs
translations accordingly as the file is read in. This can be overridden
using the commands `find-file-binary' and `find-file-text', described
in the previous section.
- Variable: auto-compute-file-type-p
This variable, which defaults to `t', determines whether the
buffer's file type is set according to the name of the file. (If
set to `nil', of course, the value of `default-file-type' will be
used.)
- Variable: file-name-file-type-alist
This variable determines how a file type is obtained from a file
name. Its format is an alist associating regular expressions with
file type values (`nil' or `t'). The alist is scanned and the
first
`file-name-file-type-alist' initially looks something like this:
(defvar file-name-file-type-alist
'(
("\\.elc$" . nil) ; *.elc binary
("\\.obj$" . nil) ; *.obj binary
("\\.exe$" . nil) ; etc
("\\.com$" . nil)
("\\.lib$" . nil)
("/config.sys$" . nil); config.sys text
("\\.sys$" . nil) ; *.sys binary
("\\.chk$" . nil) ; *.chk binary ;; chkdsk.exe dumps this.
("\\.zip$" . nil)
; the rest are Windows files
("\\.dll$" . nil)
("\\.bmp$" . nil)
("\\.ico$" . nil)
("\\.res$" . nil)
("\\.pif$" . nil)
("\\.sym$" . nil)
("\\.scr$" . nil)
("\\.fon$" . nil)
("\\.fot$" . nil)
("\\.ttf$" . nil)
))
- Function: find-file-name-from-file-type FILENAME
This function looks up FILENAME in `file-name-file-type-alist' and
returns the file type found (either `t' or `nil'). If FILENAME
could not be matched, the default value of `file-type' is returned.
- Function: define-file-name-file-type EXPR TYPE
This function adds a new expression to the alist
`file-name-file-type-alist'. From now on, any file name matching
regular expression EXPR will be considered to have file type TYPE,
which should be `t' or `nil'.
File: winemacs, Node: Editing Files in Hex Mode, Next: MS-DOS Filenames, Prev: Editing Binary Files, Up: More About Win-Emacs
Editing Files in Hex Mode
=========================
To edit a file in hex-dump mode (called "hexl-mode" in Emacs), use
the command `M-x hexl-find-file'.
File: winemacs, Node: MS-DOS Filenames, Next: Low-Level PC Functions, Prev: Editing Files in Hex Mode, Up: More About Win-Emacs
MS-DOS Filenames
================
Under MS-DOS, filenames are composed of two parts, a base of 1 to 8
characters and an extension of 0 to 3 characters, with a period used to
separate the two parts. (More characters can be specified in the base
and extension, but they will be ignored.) Filenames are not
case-sensitive and are subject to many limitations on valid characters
(for example, a colon may not appear anywhere in a filename; a period
may only occur as the separator between the base and the exponent,
except in the special files `.' and `..'; etc.).
Win-Emacs automatically converts all filenames to lowercase,
truncates their names to follow MS-DOS constraints, and checks for
invalid characters in a filename. Drive specifications at the
beginning of a filename are recognized and accepted, and drive
specifications are handled correctly in such functions as
`file-name-absolute-p'. The function `expand-file-name', which
converts a filename to its absolute representation, automatically
inserts the proper drive specification as necessary. In addition,
slashes and backslashes are both accepted as directory separator
characters; backslashes are internally converted to slashes, to be
consistent with Unix.
MS-DOS filename limitations make it infeasible to duplicate the
behavior of Emacs under Unix, where backup filenames are formed by
appending a `~' (or a `~' and a number, for numbered backups) and
auto-save filenames are formed by appending and pre-pending a `#'.
Instead, Win-Emacs forms backup filenames by appending a `~' to the
extension if it is fewer than 3 characters in length, and otherwise by
replacing the last character in the extension with a `~'. Numbered
backups are disallowed entirely. Auto-save filenames are formed by
pre-pending a `#' to the base (removing the last character of the base
if necessary) and appending a `#' to the extension just like `~' is
added for backup files.
File: winemacs, Node: Low-Level PC Functions, Prev: MS-DOS Filenames, Up: More About Win-Emacs
Low-Level PC Functions
======================
* Menu:
* Generating 8086 Software Interrupts::
* Accessing Linear Memory Directly::
File: winemacs, Node: Generating 8086 Software Interrupts, Next: Accessing Linear Memory Directly, Up: Low-Level PC Functions
Generating 8086 Software Interrupts
-----------------------------------
8086 software interrupts can be generated using the function
`int86'. (Please note that this function bypasses the protection
normally provided in E-Lisp, and can easily cause Win-Emacs, or Windows
itself, to crash.) Registers are passed in and returned in a special
"register" type (actually a vector of all the register values). The
function `make-register' creates a new instance of register type;
`set-register-value' sets a particular register in such an instance;
and `register-value' returns the value of a register in such an
instance. The `register' argument to these latter two functions is a
symbol specifying the register to be set or whose value is to be
retrieved, and can be one of the standard 8086 registers `ax', `bx',
`cx', `dx', `si', `di', `flags', `al', `ah', `bl', `bh', `cl', `ch',
`dl', `dh', or `cflag' for the carry flag.
As an example, the following C code to determine the
currently-selected drive:
int
GetDisk ()
{
union REGS regs;
regs.h.ah = 0x19; /* 25 */
int86 (0x21 /* 33 */, ®s, ®s);
return regs.h.al;
}
may be written in Win-Emacs as follows:
(defun get-disk ()
(let ((regs (make-register)))
(set-register-value regs 'ah 25) ; 0x19
(int86 33 regs) ; 0x21
(register-value regs 'al)))
File: winemacs, Node: Accessing Linear Memory Directly, Prev: Generating 8086 Software Interrupts, Up: Low-Level PC Functions
Accessing Linear Memory Directly
--------------------------------
The E-Lisp functions `win-peek-linear-memory' and
`win-poke-linear-memory' can be used to directly access and change any
location in the linear memory of the current virtual machine. Only use
these functions when absolutely necessary.
File: winemacs, Node: Other Packages, Next: Customization, Prev: More About Win-Emacs, Up: Top
Other Packages
**************
Many other interesting packages come with Win-Emacs, and a huge
number of other ones are available by FTP at
archive.cis.ohio-state.edu:/pub/gnu/emacs/elisp-archive
Here is a partial list of the packages included with Win-Emacs and
the commands or variables to access them. If a filename is listed (e.g.
`autoinsert'), it means you must use `M-x load-library' to load the
file before accessing the package. Otherwise, it will be loaded
automatically when you first use the associated command.
Note that many of the packages below have auxiliary commands and
variables that control more precisely how to package behaves. These
commands and variables usually have names related to the package's
name, and you can find them out using `M-x apropos' once the package is
loaded.
`M-x change-log-mode'
`M-x add-change-log-entry'
Conveniently maintain a log of changes to a product.
`M-x apropos'
`M-x super-apropos'
List all the symbols (i.e. commands, variables, etc.) that match a
specified regular expression. `M-x super-apropos' also looks
through the documentation strings for the symbols.
`M-x array-mode' in `array'
Edit a two-dimensional array of strings in a buffer.
variable `auto-insert-alist' in `autoinsert'
Automatically insert text into a file when it's created. The text
inserted depends on the extension of the file, similarly to how
the correct mode is determined for a file using AUTO-MODE-ALIST.
variable `big-menubar' in `big-menubar'
An alternative menubar that contains many more entries than the
standard one. Loading this file automatically makes the big
menubar current.
`blink-paren' package
Loading this package causes the associated parenthesis (brace,
bracket, etc.) to blink when the cursor is sitting on the matching
one.
`C-x C-b' or `M-x buffer-menu'
Display a list of buffers. Allows you to manipulate them singly
or in groups.
`M-x calendar'
`M-x diary'
`M-x holidays'
`M-x phases-of-moon'
`M-x sunrise-sunset'
etc. (`calendar' package)
The `calendar' package consists of functions that display a
three-month calendar, manage diary entries and appointments, list
the holidays and phases of the moon around the current date,
compute the sunrise and sunset times for a specified latitude and
longitude, and do many other related things. See the on-line
documentation for details.
`M-x list-command-history'
`M-p' and `M-n' while in the minibuffer.
`C-x ESC' or `M-x repeat-complex-command'
`M-x repeat-matching-complex-command'
List recent minibuffer commands. You can edit and redo any
particular command. You can also scroll through recent minibuffer
commands by using `M-p' and `M-n' while in the minibuffer, or use
`C-x ESC' or `M-x repeat-matching-complex-command' to repeat the
most recent or a specified minibuffer command.
`M-x compare-windows'
Compare the text in the current window with the next window.
`M-x compile'
Run a compiler. For more information, *Note compile/grep/diff::.
`completer' package
Loading this package causes a smarter completion mechanism for
files and symbols to be installed. For example, `M-x l-c-h' will
automatically be converted to `M-x list-command-history'.
`crypt' package
Loading this package causes encrypted and compressed files to be
recognized and automatically encoded/decoded when you visit and
save the file.
`M-/' or `M-x dabbrev-expand'
Dynamically expand a prefix by looking for preceding words in the
text (or following words, if no preceding words are found) that
contain this word as a prefix.
`C-x d' or `M-x dired'
"Edit" a specified directory - i.e. delete, rename, print, etc.
some files in it. This is also invoked when you use `C-x C-f' or
`M-x find-file' and enter a directory name.
`M-x edebug-defun' in `edebug'
`edebug' is a source-level debugging package for Emacs-Lisp code.
`M-x edebug-defun' places a breakpoint at the beginning of the
function before point and lets you trace through the function.
See the on-line documentation for details.
`M-x emerge-files' in `emerge'
`M-x emerge-files-with-ancestor' in `emerge'
`M-x emerge-buffers' in `emerge'
`M-x emerge-buffers-with-ancestor' in `emerge'
Merge two files or buffers together, with or without a common
ancestor.
`M-x evi'
Make Emacs emulate the popular VI editor under Unix.
`M-.' or `M-x find-tag'
`M-,' or `M-x tags-loop-continue'
Visit the file where a specified symbol (function, global variable,
etc.) is defined and jump to its definition. Uses a `TAGS' file
that is generated by the auxiliary program `etags'. `M-.' finds
the first occurrence and `M-,' loops through each other
occurrence. See the on-line documentation for details.
`M-x font-lock-mode'
Dynamically add syntax highlighting to your code. See *Note
Syntax Highlighting:: for details.
`M-x hexl-find-file'
Edit a file in hex-dump mode.
`M-x info'
Enter the on-line documentation browser. Also available as the
`Info' item on the `Help' menu.
`M-x list-options'
`M-x edit-options'
Display or edit a list of user-settable options.
`M-x edit-picture'
Edit your text as a picture instead of as normal text.
`saveconf' package
Automatically save and restore the context (i.e. the window
configuration and the files that were being visited in them) when
Emacs exits and starts up again. See the sample `emacs.ini' file
to find out how to use this.
`session' package
Loading this file in your `emacs.ini' file causes the last file
you visited to be reloaded at start-up. This is a simpler version
of the `saveconf' package.
`M-x display-time'
Display the current time in the modeline.
Win-Emacs also includes some games that you can play and other
diversions for when you are tired of working.
`M-x blackbox' in `blackbox'
"Blackbox" game. For details, see the documentation for this
function.
`M-x conx'
`M-x conx-buffer'
`M-x conx-region'
Creatively mangle your text. Use `M-x conx-buffer' or `M-x
conx-region' to scarf some words, and then `M-x conx' to generate
the mangled text.
`M-x dissociated-press'
Creatively rearrange your text. Similar to `M-x conx'.
`M-x doctor'
Let Emacs psychoanalyze you.
`M-x flame' in `flame'
Generate random flames.
`M-x psychoanalyze-flamer' in `flame'
Let Emacs psychoanalyze the flame generator.
`M-x gomoku' in `gomoku'
Play Gomoku (similar to Go) with Emacs. For details, see the
documentation for this function.
`M-x hanoi'
Demonstration of the famous "Towers of Hanoi" problem.
`M-x life' in `life'
John Conway's mathematical game of Life.
`M-x spook' in `spook'
Add random national-security-sensitive words to your text.
`M-x studlify-word' in `studly'
`M-x studlify-region' in `studly'
`M-x studlify-buffer' in `studly'
Add Studly capitalization to a word, region, or buffer.
`M-x yow'
Return a Zippy quotation.
`M-x psychoanalyze-pinhead'
Let Emacs psychoanalyze Zippy.
File: winemacs, Node: Customization, Next: More Documentation, Prev: Other Packages, Up: Top
Customization
*************
* Menu:
* Initialization Files::
* Specifying Colors::
* Specifying Fonts::
* Binding Keys::
File: winemacs, Node: Initialization Files, Next: Specifying Colors, Up: Customization
Initialization Files
====================
The operation of Win-Emacs can be controlled by initialization files
located in the directory specified in the environment variable
`EMACSHOME', or `HOME' if `EMACSHOME' does not exist, or in `c:\' if
neither environment variable exists. The most commonly used startup
files are `emacs.ini' and `xdefault.ini'. It is not necessary for
either file to exist; Win-Emacs provides reasonable defaults for all
configurable options.
* Menu:
* emacs.ini:: E-Lisp commands executed at startup.
* xdefault.ini:: Default colors, fonts, etc.
* xmodmap.ini:: Remap the mouse buttons.
File: winemacs, Node: emacs.ini, Next: xdefault.ini, Up: Initialization Files
The file `emacs.ini'
--------------------
The file `emacs.ini' contains arbitrary Emacs-Lisp code to be
executed at startup and is the equivalent of the Unix `.emacs' file.
Keys can be rebound, options can be set, etc. For example:
(global-set-key "\C-x\C-j" 'goto-line)
causes the key sequence `C-x C-j' (`C-x' is Emacs lingo for
`Control-x'; similarly, `M-x' means `Meta-x', which in Win-Emacs means
press `Alt-x' or `ESC x') to execute the Emacs-Lisp command
`goto-line', which will prompt for a line number to move to. For more
information on Emacs commands, *Note More Documentation::.
For compatibility with earlier versions of Win-Emacs, E-Lisp commands
will also be loaded out of the file `_emacs' if it exists. You should
not use this, however; use `emacs.ini' instead.
File: winemacs, Node: xdefault.ini, Next: xmodmap.ini, Prev: emacs.ini, Up: Initialization Files
The file `xdefault.ini'
-----------------------
The file `xdefault.ini' allows the startup fonts, colors, and other
graphical options (called "resources") to be specified. (This is
equivalent to the X Windows `.Xdefaults' file and has the same format.)
Each line of this file specifies a resource pattern and a value,
separated by a colon.
* Menu:
* Intro to Resources:: How to specify graphics options.
* Win-Emacs Resources:: List of options you can specify.
File: winemacs, Node: Intro to Resources, Next: Win-Emacs Resources, Up: xdefault.ini
Introduction to Resources
.........................
A "resource pattern" is either the name of a resource or a wildcard
specification (matching a number of resources), similar to a wildcard
filename specification. The resources themselves are named
hierarchically, similar to names in the file system. As a hypothetical
example, consider a program named `Quark'. This program might have a
resource to specify the language that messages should be printed out
in, and its name might be `Quark.language'. Then, a simple resource
specification might be
Quark.language: Swahili
Quark might also have resources to control its colors, fonts, etc.
Perhaps this program has a menubar, a display area, an edit area, an
error area, etc. Each of these areas can have its own font, foreground
color, background color, size, and so on. In such a case, a sub-level
would probably be used; then there would exist resources
`Quark.menubar.font', `Quark.menubar.foreground',
`Quark.menubar.background', `Quark.display.font',
`Quark.display.foreground', `Quark.display.background', etc. If you
want to set the display area's foreground color to dark green, then you
could say
Quark.display.foreground: dark green
What if you wanted to set all foreground colors at once? Then you
could say
Quark*foreground: red
The asterisk substitutes for zero or more levels in between; thus it
would set resources called `Quark.display.foreground' and
`Quark.menubar.foreground' and `Quark.error_area.foreground', and also
`Quark.grapher.menubar.foreground' and
`Quark.grapher.error_area.foreground' and so on.
What if you wanted to set all foreground colors to red, *except*
that you wanted the display area to be dark green? Then you would say
something like:
Quark*foreground: red
Quark.display.foreground: dark green
The more specific pattern overrides the more general one. (The same
thing would happen if you reversed the order of the above two lines.
The order of lines in `xdefault.ini' doesn't matter.)
File: winemacs, Node: Win-Emacs Resources, Prev: Intro to Resources, Up: xdefault.ini
Win-Emacs Resources
...................
Win-Emacs has resources that control foreground colors, background
colors, fonts, cursor colors, cursor shapes, and so on. A particular
screen (i.e. top-level Windows window) can have its characteristics
specified individually, according to the name of the screen; so can a
particular face, or a particular face on a particular screen. (By
default all screens are named `emacs', so differentiating by screens
isn't too useful unless you change a screen's name. This will become
more useful when features like `info' are modified to use their own
screens.) The application name of Win-Emacs is `Emacs'. Wildcard
resource patterns should always be used, because the actual
fully-qualified resource names may change from release to release.
For example, to set the font of all screens, you could say:
Emacs*font: Courier-12
To set the font on a screen named `myscreen', you could say:
Emacs*myscreen*font: Courier-12
To set the background of the modeline face, you could say:
Emacs*modeline*attributeBackground: goldenrod
See the file `NEWS' in the `etc' subdirectory for more information
about specific resources.
File: winemacs, Node: xmodmap.ini, Prev: xdefault.ini, Up: Initialization Files
The file `xmodmap.ini'
----------------------
This file allows the mapping between logical and physical pointer
buttons to be changed (see also *note Remapping the Pointer::.). The
format of this file is the same as a standard `.xmodmaprc' file under X
(i.e. input to the `xmodmap' command). Comments are specified by
beginning a line with a `!', and lines beginning with keywords are
directives that specify mappings. Currently the only directive that is
processed is the `pointer' directive. For example, the directive
pointer = 1 3 2
assigns logical button 1 to the left mouse button, logical button 3
to the middle mouse button, and logical button 2 to the right mouse
button. This way, for example, the middle mouse button would bring
down a popup menu and the right mouse button would insert the selected
text at the current mouse position.
File: winemacs, Node: Specifying Colors, Next: Specifying Fonts, Prev: Initialization Files, Up: Customization
Specifying Colors
=================
A color value is represented internally as a triple of numbers (R,
G, B), specifying (respectively) the intensity of the red, green, and
blue components of the color. Each number can be between 0 and 255,
with higher values corresponding to brighter colors.
When Win-Emacs expects you to specify a color, you can do it in one
of two ways: either by giving the RGB values directly or by using a name
(such as `red' or `forest green') that Win-Emacs recognizes. The
recognized color names are listed in the file `rgb.txt' in the `bin'
subdirectory. Each line in this file lists the R, G, and B values of
the color followed by its name, which is not case sensitive. You can
modify this file and add your own color names.
To specify an RGB value directly, use the format `#RGB' or
`#RRGGBB', where each letter represents a single hexadecimal digit.
For example, the specification `#CAA520' represents the RGB triple
(0xCA, 0xA5, 0x20) or (218, 165, 32) in decimal. (This is equivalent to
the color `goldenrod' in `rgb.txt'.) The format `#RGB' is equivalent to
`#R0G0B0': e.g. `#6A3' is the same as `#60A030', which is the RGB
triple `(0x60, 0xA0, 0x30)' or `(96, 160, 48)' in decimal.
File: winemacs, Node: Specifying Fonts, Next: Binding Keys, Prev: Specifying Colors, Up: Customization
Specifying Fonts
================
Font names may be specified in one of two ways: A simplified method
that is specific to Win-Emacs, or the standard X/Windows way. Under
most circumstances, you will want to use the simplified method, because
it is more intuitive.
* Menu:
* Simplified Font Form:: The easy way to specify fonts.
* X/Windows Font Form:: The hard, X-compatible way.
* Font Names:: The actual fonts you can use.
File: winemacs, Node: Simplified Font Form, Next: X/Windows Font Form, Up: Specifying Fonts
Simplified Font Form
--------------------
Fonts can be specified using a simplified form, which is one of the
following:
NAME-SIZE
NAME-SIZE-italic
NAME-SIZE-bold
NAME-SIZE-bold-italic
NAME-SIZE-demibold
NAME-SIZE-demibold-italic
where NAME is the font family (e.g. `Courier') and SIZE is the size
in points. For example, `Courier-12' specifies a 12-point
medium-weight upright Courier font and `Fixedsys-9-bold' specifies a
9-point bold-weight upright Fixedsys font.
File: winemacs, Node: X/Windows Font Form, Next: Font Names, Prev: Simplified Font Form, Up: Specifying Fonts
X/Windows Font Form
-------------------
(same as "-*-Courier-medium-r-*-*-*-120-*-*-*-*-*")
Fonts can also be specified in the standard X/Windows format. You
probably do not need to use this format except under special
circumstances, unless you wish to be compatible with X/Windows. Fonts
in X/Windows have long names that begin with a dash, such as
-adobe-courier-medium-r-normal--12-120-100-100-m-100-iso-8859-1
The sections of the font name have meanings as follows:
-[1]-[2]-[3]-[4]-[5]-[6]-[7]-[8]-[9]-[10]-[11]-[12]-[13]
where
[1] = foundry that produced the font
[2] = font family name
[3] = weight (`medium' or `bold' or `demibold')
[4] = slant (`r' (upright) or `o' (oblique) or `i' (italic))
[5] = set width (usually `normal'; could be `semicondensed',
`condensed', `narrow', `double width', etc.)
[6] = serif (blank or `sans')
[7] = pixels
[8] = points (in tenths of a point)
[9] = horizontal resolution in dpi
[10] = vertical resolution in dpi
[11] = spacing (`m' (monospace) or `p' (proportional))
[12] = average width (in tenths of a pixel)
[13] = character set (usually `iso8859-1')
Specifying fonts in this fashion gives a great deal of information
about the font. However, it's rather inconvenient to have to specify
long names like this, so X provides a wildcarding mechanism. Whenever
a font is called for, a "font specification" can be given where an
asterisk substitutes for 0 or more characters in a font name, very
similar to wildcards in a filename. For example, under X the font
specification
-*-courier-medium-r-*-120-* (** DOES NOT WORK IN WIN-EMACS **)
matches the fully-qualified font name given above, and also matches
any other Courier 12-point medium upright font that exists on the
system.
Win-Emacs supports font specifications; however, its wildcarding
mechanism is incomplete, and an asterisk can only be used to substitute
for exactly one section of the font name. For example, the font
specification
-*-courier-medium-r-*-*-*-120-*-*-*-*-* (** WORKS IN WIN-EMACS **)
is equivalent to the one above and is valid under Win-Emacs.
(This restriction is likely to be removed in a future release.)
Notes about particular sections:
Under X/Windows, the "foundry" is the corporation that designed the
font. Under Win-Emacs, the foundry is one of `raster', `vector',
or `TrueType', specifying the type of font. Raster fonts are
stored as bitmaps and are designed for a particular size, but can
be scaled up in integral multiples of this size. Vector fonts are
an old type of fonts, not used much any more, that are arbitrarily
scalable but very slow to draw. TrueType fonts are a new type of
fonts present starting in Windows 3.1, that are fast and are
arbitrarily scalable to different sizes.
Under Win-Emacs, there is no difference between `italic' and
`oblique'.
The set width is always `normal' under Win-Emacs.
The serif is always blank, even for sans-serif fonts, because
Win-Emacs cannot determine whether a font has serifs or not.
A "point" is a unit approximately equal to 1/72 of an inch.
File: winemacs, Node: Font Names, Prev: X/Windows Font Form, Up: Specifying Fonts
Font Names
----------
The following fixed-width font names and sizes come standard with
Windows:
* Courier (10-point, 12-point, 15-point)
* Courier New (any point size)
* Fixedsys (9-point)
File: winemacs, Node: Binding Keys, Prev: Specifying Fonts, Up: Customization
Binding Keys
============
Win-Emacs allows for extremely flexible customization of key
bindings. Almost any "chord", or combination of a key with zero or
more of the Control, Meta, ("Alt" or "Esc"), and Shift modifiers, can
be bound separately from any other chord. Bindings are not limited to
key/modifier combinations that have ASCII character representations.
Chords can be bound to an arbitarily long sequence of other chords, to
an arbitary Emacs-Lisp function, or to nothing at all. Furthermore, a
sequence of chords can have its own binding if all but the last chord
in the sequence is defined as a "prefix". For example, `C-x' is
usually a prefix, allowing the sequence `C-x C-f' to be bound to the
Emacs-Lisp function `find-file'. (See the Emacs-Lisp documentation for
detailed information about prefixes.)
File: winemacs, Node: More Documentation, Next: Bugs/Help/Crashes, Prev: Customization, Up: Top
Where to Look for More Documentation
************************************
* There is extensive on-line documentation (called "Info"), which
can be retrieved from within Emacs by choosing the `Info' option
from the `Help' menu or by typing `C-h i'. This documentation
explains how to use Win-Emacs as an editor, how to program in
Emacs-Lisp, how to add more on-line documentation, and how to use
the various Emacs extensions. The documentation in Info is
structured as hypertext, meaning that it is text that contains
links to other text. The links are displayed in boldface and
highlight (normally in green) when you move the mouse over them.
To follow a link, just click the mouse on it. Other commands are
available by clicking the right mouse button to bring up a pop-up
menu of commands.
* If you are unfamiliar with Emacs, you can access a guided tutorial
by choosing the `Tutorial' option from the `Help' menu or by
typing `C-h t'.
* Sample `emacs.ini' and `xdefault.ini' files are available in the
`etc' subdirectory in the Win-Emacs distribution.
* You can obtain help on a specific key or key sequence by choosing
the `Describe Key...' option from the `Help' menu or by typing
`C-h k'. When prompted for a key, type in a key sequence (for
example, `C-x C-f'). Documentation will be displayed in a
separate window; type `C-x 1' to get rid of the window.
* Similarly, you can obtain help on a specific function by choosing
the `Describe Function...' option from the `Help' menu or by
typing `C-h f', and on a specific variable by choosing the
`Describe Variable...' option from the `Help' menu or by typing
`C-h v'
* If you are not sure of the name of a command but have some idea of
its name, you can use the `Command Apropos...' option of the
`Help' menu (also available by typing `C-h a'). This will prompt
you for a string and list all commands containing that string in
their name. (The string you enter is actually a regular
expression.)
* The file `etc/NEWS' provides specific information about Emacs 19
additions. You can read this file conveniently by choosing the
`Emacs News' option from the `Help' menu or by typing `C-h n'.
File: winemacs, Node: Bugs/Help/Crashes, Next: Differences From Other Emacsen, Prev: More Documentation, Up: Top
Bugs/Help/Crashes
*****************
There is extensive on-line documentation available; see the previous
chapter for details.
If you think you have discovered a bug in Win-Emacs, you can send
e-mail to the Win-Emacs list `win-emacs@pearlsoft.com'; others may have
seen the problem and can give you advice. (The technical people at Pearl
all read this list, and will respond as necessary.) This is also a very
good source if you can't figure out how something works or are unclear
about something. Make sure you give an exact description of what is
going on, including what you tried to do, the symptoms you see, the text
of any error or warning messages you get, your hardware/software
configuration (mention especially anything you have that might be
unusual), and (if possible) a recipe for reproducing the problem.
You can also contact Pearl Software directly (*Note Contacting Pearl
Software::).
Before you ask about a bug, however, keep in mind that the following
are known limitations in the current version of Win-Emacs:
* Support for italicized and variable-width fonts is not perfect.
* Win-Emacs may not always handle resource limitations gracefully.
In some circumstances it may crash when it runs out of memory.
* Asynchronous subprocesses are not currently supported.
In order to guard against power failures and the like, Win-Emacs
frequently "auto-saves" your files, meaning that it saves copies of
what is in the buffer currently. The name of the auto-save file is
similar to the name of the file, but with `#' characters appended and
prepended. For example, the auto-save file for `mytest.c' would be
called `#mytest.c#'. (See *note MS-DOS Filenames::. for more information
on auto-save file names.)
You can recover the contents of the file from its auto-save file
using the command `M-x recover-file'. This displays the sizes and dates
of the file and its auto-save file, and lets you choose whether to
recover the file. Win-Emacs will automatically remind you about using
`M-x recover-file' whenever you visit a file that has an auto-save file
that is more recent than the time that the file was last saved.
Any time that Win-Emacs crashes due to an internal error or is killed
(e.g. when you exit Windows), it attempts to auto-save all current
buffers. If Win-Emacs crashes, you will probably see a message box that
says `Fatal Error in Win-Emacs!' or `Assertion Failure'. If so, please
report the problem to Pearl Software as described above, and we will
try to eliminate it as soon as possible.
File: winemacs, Node: Differences From Other Emacsen, Next: Source Code, Prev: Bugs/Help/Crashes, Up: Top
Differences From Other Emacsen
******************************
Please look in the file `NEWS' in the `etc' subdirectory for more
information. This file documents the differences between Emacs 18 and
Lucid Emacs 19.6.
File: winemacs, Node: Source Code, Next: Contacting Pearl Software, Prev: Differences From Other Emacsen, Up: Top
Obtaining Source Code
*********************
Source code for the Emacs DLL and for the Emacs-Lisp files can be
FTP'ed from `ftp.netcom.com:/pub/pearl'. The Emacs DLL source code is
in the form of diffs; in order to construct the source files, you will
need to obtain the Lucid-Emacs 19.6, X Library, and X Toolkit sources.
See the `README' file at the FTP site for more information.
The full source code (not in diff form) can also be ordered from us
for a shipping/handling fee. Please contact us for more information.
File: winemacs, Node: Contacting Pearl Software, Prev: Source Code, Up: Top
Questions, Comments, Problems, Bug Reports
******************************************
Pearl Software is reachable by e-mail at:
`tech@pearlsoft.com'
For technical questions about the product (whether a particular
feature is implemented, how to use a particular package, why
something doesn't seem to work, etc.).
`sales@pearlsoft.com'
How to order the product, support contracts, upgrades, etc.
`info@pearlsoft.com'
This is an auto-reply message that gives an introduction to
Win-Emacs, specifies how to get it, etc. Since this is an
auto-reply, do *not* send anything to this address that you want a
human to reply to! It will get discarded.
`listserv@pearlsoft.com'
This is Pearl Software's mail server, which allows you to obtain
files about Win-Emacs, find out about the available mailing lists,
determine which lists you're on, etc. Keep in mind that there is
a computer on the other end of this address: Thus, you need to
send special commands that it understands. For details, send a
one-line message containing the word word `help' to this address.
As of the writing of this guide, the following mailing lists are
maintained by Pearl Software:
`win-emacs@pearlsoft.com'
A general discussion group about Win-Emacs. To subscribe, send
mail to `win-emacs-request@pearlsoft.com' containing just the word
`subscribe' in its body.
`announcement@pearlsoft.com'
Group to which announcements of new releases of Win-Emacs and
similar information is sent. To subscribe, send mail to
`announcement-request@pearlsoft.com' containing just the word
`subscribe' in its body.
You can also contact Pearl Software at
2000 Powell St.
Suite 1200
Emeryville, CA 94608
voice: 510-652-4361
fax: 510-652-4362